<div class="widgets">
  <div class="row">
    <div class="col-md-12">
      <div ba-panel ba-panel-title="现有用户列表"
           ba-panel-class="with-scroll">
        <div class="horizontal-scroll" style="min-height: 300px">
          <table class="table table-hover table-condensed " st-pipe="callServer" st-table="data.pageData">
            <thead>
            <tr class="sortable">
              <th class="table-id">序号</th>
              <th>激活码</th>
              <th>姓名</th>
              <th>手机号</th>
              <th>入住时间</th>
              <th>离开时间</th>
              <th>酒店信息</th>
              <th>联系电话</th>
              <th>状态</th>
              <th>创建时间</th>
              <th>原因</th>
              <th ng-if="companyType == 2">操作</th>
            </tr>
            <tr>
              <th></th>
              <th>
                <input st-search="code" placeholder="查询激活码" class="input-sm form-control search-input" type="search"/>
              </th>
              <th>
                <input st-search="name" placeholder="查询姓名" class="input-sm form-control search-input" type="search"/>
              </th>
              <th>
                <input st-search="mobile" placeholder="查询手机号" class="input-sm form-control search-input" type="search"/>
              </th>
              <th>
                <div class="btn-group">
                  <button type="button" class="btn btn-default myRegisterTime dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    {{chooseDisplay || '请选择..'}} <span class="caret"></span>
                  </button>
                  <ul class="dropdown-menu" ng-click="$event.stopPropagation()">
                    <li><a href="" ng-click="searchRegisterTime(0)">全部</a></li>
                    <li><a href="" ng-click="searchRegisterTime(1)">今天</a></li>
                    <li><a href="" ng-click="searchRegisterTime(3)">最近三天</a></li>
                    <li><a href="" ng-click="searchRegisterTime(7)">最近一周</a></li>
                    <li><a href="" ng-click="searchRegisterTime(30)">最近一月</a></li>
                    <li role="separator" class="divider"></li>
                    <li style="width: 240px;">
                      <div class="row" style="float: left;margin-left: 5px">
                        <div class="col-xs-5" style="padding: 0!important;">
                          <input class="form-control" style="width: 80px;font-size: smaller;padding: 0"
                                 ng-model="startDate"
                                 ng-model-options="{ updateOn: 'blur' }"
                                 placeholder="起始时间..."
                                 moment-picker="startDate"
                                 name="currEndTime">
                        </div>
                        <div class="col-xs-5" style="padding: 0!important;">
                          <input class="form-control" style="width: 80px;font-size: smaller;padding: 0"
                                 ng-model="endDate"
                                 ng-model-options="{ updateOn: 'blur' }"
                                 placeholder="结束时间..."
                                 moment-picker="endDate"
                                 min-date = "startDate"
                                 name="currEndTime">
                        </div>
                        <div class="col-xs-2" style="padding: 0!important;">
                          <button class="btn btn-default" ng-click="specifyRegisterRange(startDate, endDate)">确定</button>
                        </div>
                      </div>
                  </ul>
                </div>
              </th>
              <th></th>
              <th>
                <input st-search="hotelName" placeholder="查询酒店名称" class="input-sm form-control search-input" type="search"/>
              </th>
              <th></th>
              <th>
                <select class="form-control" ng-model="status" st-search="status"
                        style="width: 100px">
                  <option value="">全部</option>
                  <option value="0">待确认</option>
                  <option value="1">确认</option>
                  <option value="2">拒绝</option>
                </select>
              </th>
              <th colspan="7"></th>
            </tr>
            </thead>
            <tbody ng-show="!isLoading">
            <tr ng-repeat="item in data.pageData track by $index">
              <td class="table-id">{{(data.pageNo - 1)*20 + $index + 1}}</td>
              <td>{{item.code}}</td>
              <td><div ng-bind-html="item.name | emoticons:{linkTarget:'_blank'}"></div></td>
              <td>{{item.mobile}}</td>
              <td>{{item.checkinDate | amDateFormat:'YYYY-MM-DD HH:mm'}}</td>
              <td>{{item.checkoutDate | amDateFormat:'YYYY-MM-DD HH:mm'}}</td>
              <td>
                {{item.hotelCity + item.hotelDistrict + item.hotelAddress + item.hotelName}}
              </td>
              <td>{{item.companyMobile}}</td>
              <td>{{{0:'待确认', 1:'确认', 2:'拒绝'}[item.status]}}</td>
              <td>{{item.createDate | amDateFormat:'YYYY-MM-DD HH:mm'}}</td>
              <td>{{item.reason}}</td>
              <td width="100px" ng-if="companyType == 2">
                <div class="buttons" >
                  <button class="btn btn-info  btn-xs" ng-disabled="item.status != 0" ng-click="setItem(item)">{{item.status != 0 ? '已审核' : '审核'}}</button>
                </div>
              </td>
            </tr>
            </tbody>
            <tbody ng-show="isLoading">
            <tr>
              <td colspan="15" class="text-center">加载中 ... </td>
            </tr>
            </tbody>
            <tfoot>
            <tr>
              <td colspan="15" class="text-center">
                <div st-template="app/pages/support/pagination.html" st-pagination="" st-items-by-page="PAGE_SIZE" st-displayed-pages="5"></div>
              </td>
            </tr>
            </tfoot>
          </table>
          <p>共{{data.totalCount}}条。{{PAGE_SIZE}}条/页。共{{data.totalPage}}页</p>
        </div>
      </div>
    </div>
  </div>
</div>
